Crate training or getting a puppy pen teaches your puppy to stay in a space quietly playing or napping.
For the first few nights your puppy is home, you might want to let them sleep in your room so they are reassured they’re safe.
Always make sure your pet is on a leash when you are outside, unless you are in a safe and secure fenced in area.